<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻导航案例</title>
    <style>
        /* a:link{
        background-color:black;
        color:white;
    }
    a:visited{
        background-color:black;
        color:white;
    }
    a:hover{
        background-color: red;
    }
    a:active{
        background-color: red;
    } */
    a{
        background-color: black;
        color: white;
        text-decoration: none;
        padding: 10px;
        display:inline-block;
        /* display:inline-block;把行内元素转换行内块元素 */
    }
    a:hover{
        background-color:red ;
    }
    .home{
        background-color: red;
    }
    </style>
</head>
<body>
    <a href="" class="home">首页</a>
    <a href="">国内</a>
    <a href="">国际</a>
    <a href="">军事</a>
    <a href="">财经</a>
    <div>111111111</div>
</body>
</html>